package com.xushu.app.service;


import com.xushu.springframework.Autowired;
import com.xushu.springframework.Component;

/**
 * Created by xsls
 *
 */

@Component    // <bean id="aService" class="com.xs.Aservice" scope lazy autowire= depends-on="bService"/>
public class AService implements IAService  {

	@Autowired
    private IBService BService;




	@Override
	public void say() {
		System.out.println("I'm A， My B is"+BService.toString());
	}

	public AService() {
		System.out.println("创建A");
	}


	@Override
    public String toString() {
        return "InstanceA{" +
                "instanceB=" + BService +
                '}';
    }



}
